﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CARByCAR.aspx.cs" Inherits="CARByCAR"
    MasterPageFile="~/Default.master" EnableViewState="false" %>

<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>
    
<asp:Content ContentPlaceHolderID="head" ID="hd" runat="server" EnableViewState="false">

    <script src="CARByCAR.js" type="text/javascript"></script>
    <script src="js/LOV.js" type="text/javascript"></script> 
    <script src="js/Datetimepicker.js" type="text/javascript"></script>
    
    <script src="js/FileUpload.js" type="text/javascript"></script>
    
 <%--
    
    <!-- TinyMCE -->

    <script src="js/tiny_mce.js" type="text/javascript"></script>

    <!-- /TinyMCE -->--%>
    <link href="CARByCAR.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ContentPlaceHolderID="leftMenu" ID="leftnav" runat="server" EnableViewState="false">
<% Response.Write(GenerateSideMenu()); %>
</asp:Content>
<asp:Content ContentPlaceHolderID="content" ID="ctnCD" runat="server"
    EnableViewState="false">
    <div id="pnlMRTGTitle"></div>
    <div id="pnlMRTG" runat="server"></div> 
    <fieldset class="m_fs_border" id="fs_CAR">
        <legend><a class="lnk" href="javascript:toggle('CAR');">Change CAR By CAR</a>
        </legend>
        <dl class="m_fs">
            <div id="div_CAR">
            <%Response.Write(CARManager.BuildEditor_CARByCAR());
            %>
            <br />
            <dxwgv:ASPxGridView ID="dgCAR" KeyFieldName="CUSTOMER_ID" ClientInstanceName="dgCAR_c"
                runat="server" AutoGenerateColumns="false" Width="100%" Font-Size="Small"
                 OnCustomCallback="dgCAR_CustomCallback" Settings-ShowTitlePanel="true">
                <Styles Header-HorizontalAlign="Center" AlternatingRow-Enabled="True" Cell-Wrap="true" Cell-Font-Size="Smaller" Header-Wrap="true"
                    Header-Font-Size="Smaller" Header-Font-Bold="true">
                    <Header Wrap="True" Font-Size="Smaller" Font-Bold="True">
                    </Header>
                    <AlternatingRow Enabled="True">
                    </AlternatingRow>
                    <Cell Wrap="True" Font-Size="Smaller">
                    </Cell>
                </Styles>
                <Templates>
                    <TitlePanel>
                        Company list from recent CAR
                    </TitlePanel>
                </Templates>
                <SettingsPager PageSize="10">
                </SettingsPager>
                <Settings ShowFilterBar="Visible" ShowFilterRow="true" ShowFilterRowMenu="true"/>
                <SettingsBehavior AllowSort="true" />
                <%--<ClientSideEvents EndCallback="dgCAR_c_EndCallBack" />--%>
                <Columns>
                    <dxwgv:GridViewCommandColumn ShowSelectCheckbox="true" Width="5%" Caption="#">
                    </dxwgv:GridViewCommandColumn>
                    <dxwgv:GridViewDataTextColumn FieldName="CUSTOMER_ID" Name="CUSTOMER_ID" Caption="ID" Width="15%">
                    </dxwgv:GridViewDataTextColumn>    
                    <dxwgv:GridViewDataTextColumn FieldName="COMPANY_NAME" Name="COMPANY_NAME" Caption="COMPANY NAME" Width="80%">
                        <DataItemTemplate>
                        <%# GridColumnManager.GetCompanyLinkColumn(Eval("CUSTOMER_ID").ToString(), Eval("COMPANY_NAME").ToString())%>
                        </DataItemTemplate>
                    </dxwgv:GridViewDataTextColumn>
                </Columns>
                <Settings ShowFooter="True" />
            </dxwgv:ASPxGridView>
            <br />
            <%Response.Write(CARManager.BuildEditor_CARByCARNew());
            %>
            </div>
        </dl>
    </fieldset>
    <dxcb:ASPxCallback ID="cbkCAR" ClientInstanceName="cbkCAR_c" runat="server"
        OnCallback="cbkCAR_Callback">
        <ClientSideEvents CallbackComplete="function(s, e) { cbkCAR_c_CallbackComplete(e); }" />
    </dxcb:ASPxCallback>
</asp:Content>
